<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>中因医院/系统管理/登录记录</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="shortcut icon" href="/images/hospital.png">
</head>
<body>
<!-- 你的 HTML 代码 -->
<table id="demo"></table>


<script src="/layui/layui.js"></script>
<script>
    layui.use(['table'], function () {
        var table = layui.table;

        table.render({
            elem: '#demo'
            , height: 435
            , url: '/api/loginInfor/find' //数据接口
            , page: true //开启分页
            , cols: [[ //表头
                {field: 'id', title: 'ID', sort: true, fixed: 'left'}
                , {field: 'loginIp', title: '登录IP'}
                , {field: 'loginBroswer', title: '浏览器', sort: true}
                , {field: 'loginAddress', title: '登录地址'}
                , {field: 'username', title: '用户名'}
                , {field: 'description', title: '描述'}
                , {field: 'createDatetime', title: '登录时间', sort: true}

            ]]
            , response: {
                statusCode: 1
            }
            , parseData: function (res) {
                if (res.status == 1) {
                    return {
                        "code": res.status,
                        "msg": res.message,
                        "count": res.total,
                        "data": res.rows
                    }
                }
            }
        });
    });
</script>
</body>
</html>